-
Notifications
You must be signed in to change notification settings - Fork 21
Implement dpnp.interp()
#2417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Implement dpnp.interp()
#2417
Conversation
Array API standard conformance tests for dpnp=0.18.0dev2=py312he4f9c94_55 ran successfully. |
View rendered docs @ https://intelpython.github.io/dpnp/pull/2417/index.html |
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
dpnp/backend/extensions/ufunc/elementwise_functions/interpolate.cpp
Outdated
Show resolved
Hide resolved
|
||
auto fn = interpolate_dispatch_vector[out_type_id]; | ||
if (!fn) { | ||
throw py::type_error("Unsupported dtype"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to add printing out_type_id
in the error message?
struct InterpolateOutputType | ||
{ | ||
using value_type = typename std::disjunction< | ||
td_ns::TypeMapResultEntry<T, sycl::half>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have instantiated kernel with sycl::half
dtype if there is no real use case where it might be used?
@@ -348,6 +350,41 @@ def _process_ediff1d_args(arg, arg_name, ary_dtype, ary_sycl_queue, usm_type): | |||
return arg, usm_type | |||
|
|||
|
|||
def _validate_interp_param(param, name, exec_q, usm_type, dtype=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to improve the coverage here?
@pytest.mark.parametrize( | ||
"dtype_xp", get_all_dtypes(no_complex=True, no_none=True) | ||
) | ||
@pytest.mark.parametrize("dtype_y", get_all_dtypes()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pytest.mark.parametrize("dtype_y", get_all_dtypes()) | |
@pytest.mark.parametrize("dtype_y", get_all_dtypes(no_none=True)) |
This PR suggests adding an implementation of
dpnp.interp()
with sycl_kernel including support for all function arguments.